# demo07_thread.py   thread: 线程
import time
import threading  # 线程
def banzhuan():
    print("开始搬砖~")
    time.sleep(3)  # 模拟搬砖的过程
    print("结束搬砖~")
if __name__ == '__main__':
    for i in range(3):
        t = threading.Thread(target=banzhuan)  # 招工，创建新线程
        t.start()  # 工人干活，启动线程
    # 一个工人搬3块砖 3 * 3s = 9s
    # for i in range(3):
    #     banzhuan()
